Optimal. Leaf size=82 \[ \frac {-B+i A}{d \sqrt {a+i a \tan (c+d x)}}-\frac {(B+i A) \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {2} \sqrt {a} d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {3526, 3480, 206} \[ \frac {-B+i A}{d \sqrt {a+i a \tan (c+d x)}}-\frac {(B+i A) \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {2} \sqrt {a} d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 3480
Rule 3526
Rubi steps
\begin {align*} \int \frac {A+B \tan (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx &=\frac {i A-B}{d \sqrt {a+i a \tan (c+d x)}}+\frac {(A-i B) \int \sqrt {a+i a \tan (c+d x)} \, dx}{2 a}\\ &=\frac {i A-B}{d \sqrt {a+i a \tan (c+d x)}}-\frac {(i A+B) \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\sqrt {a+i a \tan (c+d x)}\right )}{d}\\ &=-\frac {(i A+B) \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {2} \sqrt {a} d}+\frac {i A-B}{d \sqrt {a+i a \tan (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.33, size = 129, normalized size = 1.57 \[ \frac {i e^{-2 i (c+d x)} \sqrt {\frac {a e^{2 i (c+d x)}}{1+e^{2 i (c+d x)}}} \left ((A+i B) \left (1+e^{2 i (c+d x)}\right )-(A-i B) e^{i (c+d x)} \sqrt {1+e^{2 i (c+d x)}} \sinh ^{-1}\left (e^{i (c+d x)}\right )\right )}{\sqrt {2} a d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.54, size = 339, normalized size = 4.13 \[ -\frac {{\left (a d \sqrt {-\frac {2 \, A^{2} - 4 i \, A B - 2 \, B^{2}}{a d^{2}}} e^{\left (i \, d x + i \, c\right )} \log \left (\frac {{\left ({\left (4 i \, A + 4 \, B\right )} a e^{\left (i \, d x + i \, c\right )} + 2 \, \sqrt {2} {\left (a d e^{\left (2 i \, d x + 2 i \, c\right )} + a d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {-\frac {2 \, A^{2} - 4 i \, A B - 2 \, B^{2}}{a d^{2}}}\right )} e^{\left (-i \, d x - i \, c\right )}}{i \, A + B}\right ) - a d \sqrt {-\frac {2 \, A^{2} - 4 i \, A B - 2 \, B^{2}}{a d^{2}}} e^{\left (i \, d x + i \, c\right )} \log \left (\frac {{\left ({\left (4 i \, A + 4 \, B\right )} a e^{\left (i \, d x + i \, c\right )} - 2 \, \sqrt {2} {\left (a d e^{\left (2 i \, d x + 2 i \, c\right )} + a d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {-\frac {2 \, A^{2} - 4 i \, A B - 2 \, B^{2}}{a d^{2}}}\right )} e^{\left (-i \, d x - i \, c\right )}}{i \, A + B}\right ) - \sqrt {2} {\left ({\left (2 i \, A - 2 \, B\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + 2 i \, A - 2 \, B\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{4 \, a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {B \tan \left (d x + c\right ) + A}{\sqrt {i \, a \tan \left (d x + c\right ) + a}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.22, size = 71, normalized size = 0.87 \[ \frac {2 i \left (-\frac {\left (-\frac {i B}{2}+\frac {A}{2}\right ) \sqrt {2}\, \arctanh \left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{2 \sqrt {a}}-\frac {-\frac {A}{2}-\frac {i B}{2}}{\sqrt {a +i a \tan \left (d x +c \right )}}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.68, size = 91, normalized size = 1.11 \[ \frac {i \, {\left (\sqrt {2} {\left (A - i \, B\right )} \sqrt {a} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right ) + \frac {4 \, {\left (A + i \, B\right )} a}{\sqrt {i \, a \tan \left (d x + c\right ) + a}}\right )}}{4 \, a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.76, size = 117, normalized size = 1.43 \[ \frac {A\,1{}\mathrm {i}}{d\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}-\frac {B}{d\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}+\frac {\sqrt {2}\,A\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {-a}}\right )\,1{}\mathrm {i}}{2\,\sqrt {-a}\,d}-\frac {\sqrt {2}\,B\,\mathrm {atanh}\left (\frac {\sqrt {2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {a}}\right )}{2\,\sqrt {a}\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {A + B \tan {\left (c + d x \right )}}{\sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________